package main

import "fmt"

func main() {

	var arr [5]int
	arr[0] = 1
	reverse(&arr)
	fmt.Println(arr)

	t := []int{1, 3, 3, 5, 6}
	fmt.Println(rotate(t, 3))

	fmt.Println(unique(t))

	a := Add

	fmt.Println(a()) // 1
}

func reverse(arr *[5]int) {
	for i, j := 0, len(arr)-1; i < j; i, j = i+1, j-1 {
		arr[i], arr[j] = arr[j], arr[i]
	}
}

func rotate(t []int, n int) []int {
	tmp := make([]int, n)
	copy(tmp, t[:n])
	copy(t[:len(t)-n], t[n:])
	copy(t[len(t)-n:], tmp[:])
	return t
}

func unique(s []int) []int {
	k := 0
	for _, v := range s {
		if s[k] == v {
			continue
		}
		k++
		s[k] = v
	}
	return s[:k+1]
}

type Circle struct {
	x, y int8
}

type Wheel struct {
	i, j int
	Circle
}

func Plus(a, b int) (x, y int) {
	x, y = a + b, a * b
	return
}

func Add() int { return 1 }

